home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 3912 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  3.3 KB

  1. Path: mail2news.demon.co.uk!wildcard.demon.co.uk
  2. From: Cyber Surfer <cyber_surfer@wildcard.demon.co.uk>
  3. Newsgroups: comp.lang.lisp,comp.lang.c++
  4. Subject: Re: Why garbage collection?
  5. Date: Fri, 26 Jan 96 16:54:31 GMT
  6. Organization: The Wildcard Killer Butterfly Breeding Ground
  7. Message-ID: <822675271snz@wildcard.demon.co.uk>
  8. References: <rvillDL4v3n.I8r@netcom.com> <hbaker-2201961503250001@10.0.2.15> <4eae5s$66p@nz12.rz.uni-karlsruhe.de>
  9. Reply-To: cyber_surfer@wildcard.demon.co.uk
  10. X-NNTP-Posting-Host: wildcard.demon.co.uk
  11. X-Newsreader: Demon Internet Simple News v1.30
  12. X-Mail2News-Path: wildcard.demon.co.uk
  13.  
  14. In article <4eae5s$66p@nz12.rz.uni-karlsruhe.de>
  15.            haible@ma2s2.mathematik.uni-karlsruhe.de "Bruno Haible" writes:
  16.  
  17. > Just look at the technical strength of the argument that GC is not
  18. > "in the tradition of the C community"...
  19.  
  20. Yeah, I love it. ;-)
  21.  
  22. BTW, I've been asked to review a GC for C++, so I guess now is a
  23. good time to grab a few authoritive documents on the subject, like
  24. the docs at cs.utexas.edu:/pub/garbage/ or the files in Henry
  25. Baker's ftp space. I'll also have to find a Ghostscript viewer
  26. (preferably for NT), as I don't currently have a Postscript viewer,
  27. unless you count a laser printer. In this case, I don't.
  28.  
  29. Mind you, I'm very happy with a mark/compact GC, and I found one
  30. in a computer science book, Fundamentals of Data Structures, by
  31. E Horowitz and S Sahni. While they're not anti-GC, they refer to
  32. Knuth and his belief that specialist languages such as Lisp and
  33. SNOBOL are not necessary, and that list and string processing can
  34. be done in any language. The languages that seem to have interested
  35. them tend to be PL/I, Pascal, and Fortran. Not at all like Lisp.
  36.  
  37. The mark/compact algorithms they give are obviously not the best
  38. available today, but they are at least simple enough to implement
  39. easily. For programmers uncomfortable with relocating possible
  40. every pointer in a heap any time the GC runs, this could be
  41. important. I was suprised to find that when I coded a GC based on
  42. their algorithms in C, they worked first time. I've been using
  43. that code for the last 8 years without trouble, and with what I
  44. find to be acceptable performance.
  45.  
  46. It was published in 1976, so its one of a number of books from
  47. around that time which I love. Sadly, many of the techniques in this
  48. particular book seem to have been forgotten. Is anyone still using
  49. coral rings, multilists and inverted multilists? Have these data
  50. structures become "obselete", like reference counting, cylinder-surface
  51. indexing, etc?
  52.  
  53. Anyway, we can be sure that garbage collectors will be around for
  54. a while yet, as a fair number of popular (that's probably a relative
  55. issue - um, relative to VB or Perl? (-; ) language using a GC of
  56. some kind are still kicking around. I think that Henry Baker made
  57. a very good point about how people perceive delays in software.
  58.  
  59. I'm currently seeing very long delays when I try to access most
  60. Internet sites in the US. :-( Still, that'll improve eventually.
  61. Then I may be able to grab some useful files, like some GC docs. ;-)
  62. Meanwhile, I should read the Java docs I have here, as I'll be
  63. using that soon. Doesn't Java use a GC...? I think it does!
  64. -- 
  65. <URL:http://www.demon.co.uk/community/index.html>
  66. <URL:http://www.enrapture.com/cybes/namaste.html>
  67. Po-Yeh-Pao-Lo-Mi | "You can never GC enough."
  68.